package com.xiang.atomikos.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiang.atomikos.annotation.DataSource;
import com.xiang.atomikos.entity.UserEntity;
import com.xiang.atomikos.mapper.UserDao;
import com.xiang.atomikos.service.AddUserOneService;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@DataSource(name="db1")
public class AddUserOneImpl extends ServiceImpl<UserDao, UserEntity> implements AddUserOneService {


  @Override
  @Transactional
  public void saveOne(UserEntity userBakEntity) {
    save(userBakEntity);
  }

  @Override
  public List<UserEntity> queryList() {
    return list();
  }
}
